﻿@{
    Layout = null;
    var gzzbt = "河南省2023年";
    gzzbt = "";
    var gzzbt1 = Program.ksmc;
    var kwzz = "工作证";
    System.Data.DataTable dt = ViewBag.dt;
}
<style>
  
    .page {
        margin-left:18;
        width: 664px;
        height: 884px;
        border: 1px solid #F00;
        text-align: center;
        page-break-after: always;
    }

    .gzznr1 {
       
        width: 50px;
        float: left;
        
        border-bottom: 1px solid #FFF;
    }
    .gzznr {
        white-space:nowrap;
        color: blue;
        width: 200px;
        border-bottom: 1px solid #000;
    }
 .pp1{
     margin-top:20;
     margin-left:40;
     margin-bottom:20;
 }
    .gzz {
        width: 330px;
        height: 440px;
        border: 1px solid #F00;
        text-align: center;
        float: left;
    }

    h4 {
        margin-left: 40px;
        text-align: left;
    }

</style>
<body>
    
    @if(dt!=null) for (int i = 0; i < dt.Rows.Count/4+1; i++)
        {
            <div class="page">
            @for (int j = 0; j < 4  && i*4+j <dt.Rows.Count; j++)
            {
                int xh = i * 4 + j;

                <div class="gzz">
                    <div>
                        <h3 class="display-4">@gzzbt<br>@gzzbt1</h3>
                         
                        <h1 class="display-4">@if (dt.Rows[xh]["kwzz"].ToString().Length > 0)
                            {
                                @dt.Rows[xh]["kwzz"]
                            }else{
                                @kwzz
                            }
                        </h1>
                        <img width="120px" height="160px"   src='/jky/GetPic?xmsfz=@dt.Rows[xh]["xm"].ToString().Trim()@dt.Rows[xh]["sfz"].ToString().Trim()' />
                    </div>
                    <div class="pp1" >
                        <div class="gzznr1">姓名：</div><div class="gzznr"> @dt.Rows[xh]["xm"] </div>

                        <div class="gzznr1">考点：</div>
                            @if (dt.Rows[xh]["kd"].ToString().Length > 0)
                            {
                                <div class="gzznr"> @dt.Rows[xh]["kd"] </div>
                            }
                            else
                            {
                                 <div class="gzznr">　</div>  //这里是一个中文空格
                            }
                        
                         <div class="gzznr1">单位：</div>
                            @if (dt.Rows[xh]["gzdw"].ToString().Length > 0)
                            {
                                <div class="gzznr"> @dt.Rows[xh]["gzdw"] </div>
                            }
                            else
                            {
                                 <div class="gzznr">　</div>  //这里是一个中文空格
                            }
                        </div>
                    <div>
                        <h5>濮阳县教育考试中心 监制</h5>
                    </div>
                </div>
            }
            </div>

        }
    else
    {
        <div class="page">
        @for (int i = 0; i < 4; i++)
        {
            <div style="float:right" class="gzz">
            <img style="margin-top:30px;" width="280px" src="/pic/ZGZBM.png">
            </div>
             
        }
        </div>
    }
    </div>
</body>